package com.mode.simple.factory;

/**
 * @Description:
 * @Author: zyf
 * @Time: 2020/9/27 10:24
 */
public class PersonFactory {

    public static Person getPerson(String instance) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        Class<?> aClass = Class.forName(instance);
        return (Person)aClass.newInstance();
    }

}
